package org.example.memora.mapper;

import org.example.memora.entity.Community;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface CommunityMapper {
    Community selectById(Long id);
    List<Community> selectAll();
    int insert(Community community);
    int updateById(Community community);
    int deleteById(Long id);
    List<Community> selectAllWithPagination(@Param("offset") int offset, @Param("limit") int limit);
    List<Community> selectAllWithPaginationByUserId(@Param("offset") int offset, @Param("limit") int limit,  @Param("userId") Long userId);

    long countAll();

}

